
package com.jf.cloud.order.bo.mongo;

import io.swagger.v3.oas.annotations.media.Schema;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;
import java.util.List;

/**
 * @author zz
 * @date 2022/8/23
 */
@Document("order")
public class MongoOrderBO {

    @Schema(description = "订单项" ,required=true)
    private List<MongoOrderItemBO> orderItems;

    @Schema(description = "用户id" ,required=true)
    private Long userId;

    @Id
    @Schema(description = "订单号" ,required=true)
    private Long orderId;

    @Schema(description = "总价" ,required=true)
    private Long actualTotal;

    @Schema(description = "使用积分" ,required=true)
    private Long orderScore;

    @Schema(description = "订单状态" ,required=true)
    private Integer status;

    @Schema(description = "订单类型(0普通订单 1团购订单 2秒杀订单)" ,required=true)
    private Integer orderType;

    @Schema(description = "订单退款状态（1:申请退款 2:退款成功 3:部分退款成功 4:退款失败）" ,required=true)
    private Integer refundStatus;

    @Schema(description = "配送类型 1:快递 2:自提 3：无需快递" ,required=true)
    private Integer deliveryType;

    @Schema(description = "店铺名称" ,required=true)
    private String shopName;
    @Schema(description = "店铺地址" ,required=true)
    private String shopAddr;
    @Schema(description = "店铺id" ,required=true)
    private Long shopId;

    @Schema(description = "订单运费" ,required=true)
    private Long freightAmount;

    @Schema(description = "订单创建时间" ,required=true)
    private Date createTime;

    @Schema(description = "商品总数" ,required=true)
    private Integer allCount;

    @Schema(description = "订单发票id" )
    private Long orderInvoiceId;

    @Schema(description = "用户备注信息" )
    private String remarks;

    @Schema(description = "收货人姓名" )
    private String consignee;

    @Schema(description = "收货人手机号" )
    private String mobile;

    /**
     * 供应商id
     */
    private Long supplierId;
    /**
     * 是否待采购 1.是 0.否
     */
    private Integer waitPurchase;

    /**
     * 平台运费减免金额
     */
    private Long platformFreeFreightAmount;

    /**
     * 分销金额
     */
    private Long distributionAmount;

    /**
     * 平台佣金
     */
    private Long platformCommission;

    /**
     * 用户订单地址Id
     */
    private Long orderAddrId;

    /**
     * 总值
     */
    private Long total;


    /**
     * 卖家备注
     */
    private String shopRemarks;

    /**
     * 支付方式 请参考枚举PayType
     */
    private Integer payType;

    /**
     * 订单关闭原因 1-超时未支付 2-退款关闭 4-买家取消 15-已通过货到付款交易
     */
    private Integer closeType;

    /**
     * 发货时间
     */
    private Date updateTime;

    /**
     * 付款时间
     */
    private Date payTime;

    /**
     * 发货时间
     */
    private Date deliveryTime;

    /**
     * 完成时间
     */
    private Date finallyTime;

    /**
     * 取消时间
     */
    private Date cancelTime;

    /**
     * 预售发货时间
     */
    private Date bookTime;

    /**
     * 是否已支付，1.已支付0.未支付
     */
    private Integer isPayed;

    /**
     * 用户订单删除状态，0：没有删除， 1：回收站， 2：永久删除
     */
    private Integer deleteStatus;

    /**
     * 积分抵扣金额
     */
    private Long scoreAmount;

    /**
     * 会员折扣金额
     */
    private Long memberAmount;

    /**
     * 平台优惠券优惠金额
     */
    private Long platformCouponAmount;

    /**
     * 商家优惠券优惠金额
     */
    private Long shopCouponAmount;

    /**
     * 满减优惠金额
     */
    private Long discountAmount;

    /**
     * 平台优惠金额
     */
    private Long platformAmount;

    /**
     * 优惠总额
     */
    private Long reduceAmount;

    /**
     * 店铺改价优惠金额
     */
    private Long shopChangeFreeAmount;

    /**
     * 商家运费减免金额
     */
    private Long freeFreightAmount;

    /**
     * 供应商商品发货方式 1.供应商发货 2.仓库发货
     */
    private Integer supplierDeliveryType;
    /**
     * 商家采购价差（需要商家从结算金额补上采购价的金额）
     */
    private Long purchaseSpreadAmount;
    /**
     * 商品编码
     */
    private String spuCodes;
    /**
     * sku编码
     */
    private String partyCodes;
    /**
     * 是否已经进行结算
     */
    private Integer isSettled;

    /**
     * 省ID
     */
    private Long provinceId;

    /**
     * 省
     */
    private String province;

    /**
     * 城市ID
     */
    private Long cityId;

    /**
     * 城市
     */
    private String city;

    /**
     * 区域ID
     */
    private Long areaId;

    /**
     * 区
     */
    private String area;

    /**
     * 地址
     */
    private String addr;

    /**
     * 邮编
     */
    private String postCode;

    /**
     * 用户类型 0:普通会员 1:付费会员
     * 用于会员统计时，判断订单是属于普通会员还是付费会员
     */
    private Integer userType;

    /**
     * 新成交订单 1:新成交订单 0：旧用户再次消费订单
     * 用于会员统计时，判断用户是否为新成交用户
     */
    private Integer firstOrder;

    /**
     * 新成交供应商订单 1:新成交供应商订单 0：旧用户再次消费订单
     * 用于供应商新用户统计时，判断用户是否为该供应商的新用户
     */
    private Integer firstSupplierOrder;

    /**
     * 预售类型 -1.未开启预售 0.全款预售类型 1.定金预售
     */
    private Integer preSaleType;
    /**
     * 是否为虚拟商品订单 1.是 0.否
     */
    private Integer orderMold;

    /**
     * 定金金额
     */
    private Long depositAmount;
    /**
     * 尾款金额
     */
    private Long balanceAmount;
    /**
     * 预售发货类型 -1.固定时间  x.尾款支付后x天发货
     */
    private Integer preSaleDeliveryType;
    /**
     * 预售发货时间
     */
    private Date preSaleDeliveryTime;
    /**
     * 尾款支付开始时间
     */
    private Date balanceStartTime;
    /**
     * 尾款支付结束时间
     */
    private Date balanceEndTime;

    /**
     * 自提点id
     */
    private Long stationId;

    /**
     * 支付单号，可能有多条所以用字符
     */
    private String payId;

    /**
     * 自提点提货码
     */
    private String stationCode;

    /**
     * 核销次数 -1.多次核销 0.无需核销 1.单次核销
     */
    private Integer writeOffNum;

    /**
     * 多次核销次数 -1.无限次
     */
    private Integer writeOffMultipleCount;

    /**
     * 核销开始时间
     */
    private Date writeOffStart;

    /**
     * 核销结束时间
     */
    private Date writeOffEnd;

    /**
     * 订单核销状态 0.待核销 1.核销完成
     */
    private Integer writeOffStatus;


    @Schema(description = "核销订单", required=true)
    private List<MongoOrderVirtualInfoBO> orderVirtualInfoList;

    private Long shopAddrId;

    private Long primaryCategoryId;

    public Long getPrimaryCategoryId() {
        return primaryCategoryId;
    }

    public void setPrimaryCategoryId(Long primaryCategoryId) {
        this.primaryCategoryId = primaryCategoryId;
    }

    public Long getShopAddrId() {
        return shopAddrId;
    }

    public void setShopAddrId(Long shopAddrId) {
        this.shopAddrId = shopAddrId;
    }

    public String getShopAddr() {
        return shopAddr;
    }

    public void setShopAddr(String shopAddr) {
        this.shopAddr = shopAddr;
    }

    /**
     * 套餐优惠金额
     */
    private Long shopComboAmount;


    public Long getShopComboAmount() {
        return shopComboAmount;
    }

    public void setShopComboAmount(Long shopComboAmount) {
        this.shopComboAmount = shopComboAmount;
    }

    public List<MongoOrderVirtualInfoBO> getOrderVirtualInfoList() {
        return orderVirtualInfoList;
    }

    public void setOrderVirtualInfoList(List<MongoOrderVirtualInfoBO> orderVirtualInfoList) {
        this.orderVirtualInfoList = orderVirtualInfoList;
    }

    public Integer getWriteOffStatus() {
        return writeOffStatus;
    }

    public void setWriteOffStatus(Integer writeOffStatus) {
        this.writeOffStatus = writeOffStatus;
    }

    public Integer getWriteOffNum() {
        return writeOffNum;
    }

    public void setWriteOffNum(Integer writeOffNum) {
        this.writeOffNum = writeOffNum;
    }

    public Integer getWriteOffMultipleCount() {
        return writeOffMultipleCount;
    }

    public void setWriteOffMultipleCount(Integer writeOffMultipleCount) {
        this.writeOffMultipleCount = writeOffMultipleCount;
    }

    public Date getWriteOffStart() {
        return writeOffStart;
    }

    public void setWriteOffStart(Date writeOffStart) {
        this.writeOffStart = writeOffStart;
    }

    public Date getWriteOffEnd() {
        return writeOffEnd;
    }

    public void setWriteOffEnd(Date writeOffEnd) {
        this.writeOffEnd = writeOffEnd;
    }

    public String getStationCode() {
        return stationCode;
    }

    public void setStationCode(String stationCode) {
        this.stationCode = stationCode;
    }

    public Long getStationId() {
        return stationId;
    }

    public void setStationId(Long stationId) {
        this.stationId = stationId;
    }

    public String getSpuCodes() {
        return spuCodes;
    }

    public void setSpuCodes(String spuCodes) {
        this.spuCodes = spuCodes;
    }

    public String getPartyCodes() {
        return partyCodes;
    }

    public void setPartyCodes(String partyCodes) {
        this.partyCodes = partyCodes;
    }

    public Integer getSupplierDeliveryType() {
        return supplierDeliveryType;
    }

    public void setSupplierDeliveryType(Integer supplierDeliveryType) {
        this.supplierDeliveryType = supplierDeliveryType;
    }

    public Long getPurchaseSpreadAmount() {
        return purchaseSpreadAmount;
    }

    public void setPurchaseSpreadAmount(Long purchaseSpreadAmount) {
        this.purchaseSpreadAmount = purchaseSpreadAmount;
    }

    public Integer getWaitPurchase() {
        return waitPurchase;
    }

    public void setWaitPurchase(Integer waitPurchase) {
        this.waitPurchase = waitPurchase;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public List<MongoOrderItemBO> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<MongoOrderItemBO> orderItems) {
        this.orderItems = orderItems;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getActualTotal() {
        return actualTotal;
    }

    public void setActualTotal(Long actualTotal) {
        this.actualTotal = actualTotal;
    }

    public Long getOrderScore() {
        return orderScore;
    }

    public void setOrderScore(Long orderScore) {
        this.orderScore = orderScore;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Integer getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

    public Integer getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(Integer deliveryType) {
        this.deliveryType = deliveryType;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getFreightAmount() {
        return freightAmount;
    }

    public void setFreightAmount(Long freightAmount) {
        this.freightAmount = freightAmount;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getAllCount() {
        return allCount;
    }

    public void setAllCount(Integer allCount) {
        this.allCount = allCount;
    }

    public Long getOrderInvoiceId() {
        return orderInvoiceId;
    }

    public void setOrderInvoiceId(Long orderInvoiceId) {
        this.orderInvoiceId = orderInvoiceId;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderAddrId() {
        return orderAddrId;
    }

    public void setOrderAddrId(Long orderAddrId) {
        this.orderAddrId = orderAddrId;
    }

    public Long getTotal() {
        return total;
    }

    public void setTotal(Long total) {
        this.total = total;
    }

    public String getShopRemarks() {
        return shopRemarks;
    }

    public void setShopRemarks(String shopRemarks) {
        this.shopRemarks = shopRemarks;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getCloseType() {
        return closeType;
    }

    public void setCloseType(Integer closeType) {
        this.closeType = closeType;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getFinallyTime() {
        return finallyTime;
    }

    public void setFinallyTime(Date finallyTime) {
        this.finallyTime = finallyTime;
    }

    public Date getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Date cancelTime) {
        this.cancelTime = cancelTime;
    }

    public Date getBookTime() {
        return bookTime;
    }

    public void setBookTime(Date bookTime) {
        this.bookTime = bookTime;
    }

    public Integer getIsPayed() {
        return isPayed;
    }

    public void setIsPayed(Integer isPayed) {
        this.isPayed = isPayed;
    }

    public Integer getDeleteStatus() {
        return deleteStatus;
    }

    public void setDeleteStatus(Integer deleteStatus) {
        this.deleteStatus = deleteStatus;
    }

    public Long getScoreAmount() {
        return scoreAmount;
    }

    public void setScoreAmount(Long scoreAmount) {
        this.scoreAmount = scoreAmount;
    }

    public Long getMemberAmount() {
        return memberAmount;
    }

    public void setMemberAmount(Long memberAmount) {
        this.memberAmount = memberAmount;
    }

    public Long getPlatformCouponAmount() {
        return platformCouponAmount;
    }

    public void setPlatformCouponAmount(Long platformCouponAmount) {
        this.platformCouponAmount = platformCouponAmount;
    }

    public Long getShopCouponAmount() {
        return shopCouponAmount;
    }

    public void setShopCouponAmount(Long shopCouponAmount) {
        this.shopCouponAmount = shopCouponAmount;
    }

    public Long getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(Long discountAmount) {
        this.discountAmount = discountAmount;
    }

    public Long getPlatformAmount() {
        return platformAmount;
    }

    public void setPlatformAmount(Long platformAmount) {
        this.platformAmount = platformAmount;
    }

    public Long getReduceAmount() {
        return reduceAmount;
    }

    public void setReduceAmount(Long reduceAmount) {
        this.reduceAmount = reduceAmount;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Long getShopChangeFreeAmount() {
        return shopChangeFreeAmount;
    }

    public void setShopChangeFreeAmount(Long shopChangeFreeAmount) {
        this.shopChangeFreeAmount = shopChangeFreeAmount;
    }

    public Long getFreeFreightAmount() {
        return freeFreightAmount;
    }

    public void setFreeFreightAmount(Long freeFreightAmount) {
        this.freeFreightAmount = freeFreightAmount;
    }

    public Long getPlatformFreeFreightAmount() {
        return platformFreeFreightAmount;
    }

    public void setPlatformFreeFreightAmount(Long platformFreeFreightAmount) {
        this.platformFreeFreightAmount = platformFreeFreightAmount;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public String getPostCode() {
        return postCode;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public Integer getFirstOrder() {
        return firstOrder;
    }

    public void setFirstOrder(Integer firstOrder) {
        this.firstOrder = firstOrder;
    }

    public Integer getIsSettled() {
        return isSettled;
    }

    public void setIsSettled(Integer isSettled) {
        this.isSettled = isSettled;
    }

    public Integer getFirstSupplierOrder() {
        return firstSupplierOrder;
    }

    public void setFirstSupplierOrder(Integer firstSupplierOrder) {
        this.firstSupplierOrder = firstSupplierOrder;
    }

    public Long getDistributionAmount() {
        return distributionAmount;
    }

    public void setDistributionAmount(Long distributionAmount) {
        this.distributionAmount = distributionAmount;
    }

    public Long getPlatformCommission() {
        return platformCommission;
    }

    public void setPlatformCommission(Long platformCommission) {
        this.platformCommission = platformCommission;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Integer getOrderMold() {
        return orderMold;
    }

    public void setOrderMold(Integer orderMold) {
        this.orderMold = orderMold;
    }

    public Long getDepositAmount() {
        return depositAmount;
    }

    public void setDepositAmount(Long depositAmount) {
        this.depositAmount = depositAmount;
    }

    public Long getBalanceAmount() {
        return balanceAmount;
    }

    public void setBalanceAmount(Long balanceAmount) {
        this.balanceAmount = balanceAmount;
    }

    public Integer getPreSaleDeliveryType() {
        return preSaleDeliveryType;
    }

    public void setPreSaleDeliveryType(Integer preSaleDeliveryType) {
        this.preSaleDeliveryType = preSaleDeliveryType;
    }

    public Date getPreSaleDeliveryTime() {
        return preSaleDeliveryTime;
    }

    public void setPreSaleDeliveryTime(Date preSaleDeliveryTime) {
        this.preSaleDeliveryTime = preSaleDeliveryTime;
    }

    public Date getBalanceStartTime() {
        return balanceStartTime;
    }

    public void setBalanceStartTime(Date balanceStartTime) {
        this.balanceStartTime = balanceStartTime;
    }

    public Date getBalanceEndTime() {
        return balanceEndTime;
    }

    public void setBalanceEndTime(Date balanceEndTime) {
        this.balanceEndTime = balanceEndTime;
    }

    public String getPayId() {
        return payId;
    }

    public void setPayId(String payId) {
        this.payId = payId;
    }

    @Override
    public String toString() {
        return "MongoOrderBO{" +
                "orderItems=" + orderItems +
                ", userId=" + userId +
                ", orderId=" + orderId +
                ", actualTotal=" + actualTotal +
                ", orderScore=" + orderScore +
                ", status=" + status +
                ", orderType=" + orderType +
                ", refundStatus=" + refundStatus +
                ", deliveryType=" + deliveryType +
                ", shopName='" + shopName + '\'' +
                ", shopId=" + shopId +
                ", freightAmount=" + freightAmount +
                ", createTime=" + createTime +
                ", allCount=" + allCount +
                ", orderInvoiceId=" + orderInvoiceId +
                ", remarks='" + remarks + '\'' +
                ", consignee='" + consignee + '\'' +
                ", mobile='" + mobile + '\'' +
                ", supplierId=" + supplierId +
                ", waitPurchase=" + waitPurchase +
                ", platformFreeFreightAmount=" + platformFreeFreightAmount +
                ", distributionAmount=" + distributionAmount +
                ", platformCommission=" + platformCommission +
                ", orderAddrId=" + orderAddrId +
                ", total=" + total +
                ", shopRemarks='" + shopRemarks + '\'' +
                ", payType=" + payType +
                ", closeType=" + closeType +
                ", updateTime=" + updateTime +
                ", payTime=" + payTime +
                ", deliveryTime=" + deliveryTime +
                ", finallyTime=" + finallyTime +
                ", cancelTime=" + cancelTime +
                ", bookTime=" + bookTime +
                ", isPayed=" + isPayed +
                ", deleteStatus=" + deleteStatus +
                ", scoreAmount=" + scoreAmount +
                ", memberAmount=" + memberAmount +
                ", platformCouponAmount=" + platformCouponAmount +
                ", shopCouponAmount=" + shopCouponAmount +
                ", discountAmount=" + discountAmount +
                ", platformAmount=" + platformAmount +
                ", reduceAmount=" + reduceAmount +
                ", shopChangeFreeAmount=" + shopChangeFreeAmount +
                ", freeFreightAmount=" + freeFreightAmount +
                ", supplierDeliveryType=" + supplierDeliveryType +
                ", purchaseSpreadAmount=" + purchaseSpreadAmount +
                ", spuCodes='" + spuCodes + '\'' +
                ", partyCodes='" + partyCodes + '\'' +
                ", isSettled=" + isSettled +
                ", provinceId=" + provinceId +
                ", province='" + province + '\'' +
                ", cityId=" + cityId +
                ", city='" + city + '\'' +
                ", areaId=" + areaId +
                ", area='" + area + '\'' +
                ", addr='" + addr + '\'' +
                ", postCode='" + postCode + '\'' +
                ", userType=" + userType +
                ", firstOrder=" + firstOrder +
                ", firstSupplierOrder=" + firstSupplierOrder +
                ", preSaleType=" + preSaleType +
                ", orderMold=" + orderMold +
                ", depositAmount=" + depositAmount +
                ", balanceAmount=" + balanceAmount +
                ", preSaleDeliveryType=" + preSaleDeliveryType +
                ", preSaleDeliveryTime=" + preSaleDeliveryTime +
                ", balanceStartTime=" + balanceStartTime +
                ", balanceEndTime=" + balanceEndTime +
                ", stationId=" + stationId +
                ", payId='" + payId + '\'' +
                ", stationCode='" + stationCode + '\'' +
                ", writeOffNum=" + writeOffNum +
                ", writeOffMultipleCount=" + writeOffMultipleCount +
                ", writeOffStart=" + writeOffStart +
                ", writeOffEnd=" + writeOffEnd +
                ", writeOffStatus=" + writeOffStatus +
                ", shopComboAmount=" + shopComboAmount +
                ", orderVirtualInfoList=" + orderVirtualInfoList +
                '}';
    }
}
